package projectmanagement.managementtool.UserServices;

import projectmanagement.models.User;
import projectmanagement.models.Task;
import projectmanagement.models.Project;

import java.util.Collection;

// TODO: add javadoc

public interface UserService {

    User createUser(String name, int age, String position, String technologies);

    /**
     * Method adds task to User with specified ID (assign task to user)
     * @param userId  ID of user
     * @param task    task that is to be assigned to the user
     * @throws IllegalArgumentException if user with this ID doesn't exist
     */
    void assignTask(int userId, Task task);

    /**
     * Method adds user with specified ID to project
     * @param userId     ID of user
     * @param project    project, the user will be assigned for
     * @throws IllegalArgumentException if user with this ID doesn't exist
     */
    void assignProject(int userId, Project project);

    User getUserById(int id);

    Collection<User> getUsersList();
    
    User getUserByName(String name);
}